from BladeFerm.hui_app.hui_lib.button import Button as HuiButton
from qturboframe.public_ui.switch_window import swith_to_new_window,switch_to_original_window

class Button(HuiButton):
    '''
    操作员中心button类
    '''

    @swith_to_new_window(10)
    def click_to_new_window(self):
        '''
        omc按钮点击弹出切换新窗口

        :Args:
         - inputdata: 无

        :Returns:
            无

        :Raises:
            SeleniumError: 无
        '''
        self.click()

    @switch_to_original_window
    def click_back_to_default_window(self):
        '''
        omc按钮点击返回旧窗口

        :Args:
         - inputdata: 无

        :Returns:
            无

        :Raises:
            SeleniumError: 无
        '''
        self.click()